Bringing these files in as sf objects will let us manipulate them. It’s important to keep in mind that parcel data for 2022 has not yet been published; I’m using property assessment 2021 data as a result.
Code
parcels <-read_sf(parcel_file, quiet =FALSE)
Reading layer `Parcels_2021' from data source `/tmp/RtmpqTQU0p/file28ed6b0a5a2d' using driver `GeoJSON'
Simple feature collection with 99105 features and 18 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -71.19091 ymin: 42.22792 xmax: -70.86865 ymax: 42.39699
Geodetic CRS: WGS 84
Rows: 177091 Columns: 63
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (45): PID, CM_ID, GIS_ID, ST_NUM, ST_NAME, UNIT_NUM, CITY, ZIPCODE, LUC,...
dbl (18): BLDG_SEQ, NUM_BLDGS, RES_FLOOR, CD_FLOOR, RES_UNITS, COM_UNITS, LA...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Clean Data
These data are about as clean as can be, but we can do my laptop a service my removing many records.
Code
prop_assess <-filter(prop_assess, CITY =='MATTAPAN')
Join Data
Code
property <- parcels %>%select(MAP_PAR_ID, geometry) %>%inner_join(prop_assess, by =c('MAP_PAR_ID'='GIS_ID'))
Render Map
We’ll render a view that generates 4 maps, so that parcels can be compared across multiple types of data.
Variable(s) "Year Built (From 1990)" contains positive and negative values, so midpoint is set to 0. Set midpoint = NA to show the full spectrum of the color palette.